<template>
    <div id="leafer-view"></div>
</template>
<script lang="ts" setup>
import { ref, onMounted} from 'vue'
import { Leafer, Rect } from 'leafer-ui';

onMounted(() => {
    const leafer = new Leafer({ view: 'leafer-view' })

    const rect = new Rect({
        x: 1000,
        y: 1000,
        width: 200,
        height: 200,
        fill: '#32cd79',
        cornerRadius: 50,
        draggable: true,
    })

    leafer.add(rect)
})

</script>

<style>

#leafer-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
</style>
